package peer.httpoutput;

import java.util.HashMap;

import peer.tools.Mdb;


public class HttpProcessorGroupMange {
	HashMap<Mdb, HttpProcessorGroup> httpProcessorGroupTable;
	boolean run=true;
	public HttpProcessorGroupMange(){
		 httpProcessorGroupTable=new HashMap<Mdb, HttpProcessorGroup>();
	}
	
	synchronized public boolean containsHttpProcessorGroup(Mdb mdb){
		return httpProcessorGroupTable.containsKey(mdb);
	}
	
	synchronized HttpProcessorGroup getHttpProcessorGroup(Mdb mdb){
		return httpProcessorGroupTable.get(mdb);
	}
	synchronized void creatHttpProcessorGroup(Mdb mdb){
		HttpProcessorGroup hpg=new HttpProcessorGroup(mdb);
		httpProcessorGroupTable.put(mdb, hpg);
	}
	
	synchronized void removeHttpProcessorGroup(Mdb mdb){
		httpProcessorGroupTable.remove(mdb);
	}
}
